package com.oig.sys.base.dto;

import com.oig.common.validator.GroupAdd;
import com.oig.common.validator.GroupEdit;
import io.swagger.v3.oas.annotations.media.Schema;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;

@Data
@Schema(description = "币种参数类")
public class CurrencyDto {

    @Schema(description = "币种编码 主键，如USD,CNY", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @NotEmpty(message = "参数错误,币种编码不能为空", groups={GroupAdd.class, GroupEdit.class})
    @Length(max = 3,min = 3, message = "参数错误,币种编码3位", groups={GroupAdd.class,GroupEdit.class})
    private String code;
    @Schema(description = "币种名", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @NotEmpty(message = "参数错误,币种名不能为空", groups={GroupAdd.class,GroupEdit.class})
    private String name;
    @Schema(description = "币种英文名")
    private String enName;

    @Schema(description = "默认单价精度")
    private Integer pricePrecision;
    @Schema(description = "默认金额精度")
    private Integer amountPrecision;

    @Schema(description = "符号")
    private String symbol;

}
